#pragma once

#include "RBTree.h"

namespace chen
{
	template<class K>
	class set
	{
	public:
		struct SetOfKey
		{
			const K& operator()(const K& key)
			{
				return key;
			}
		};

		typedef typename RBTree<K,  K, SetOfKey>::const_iterator iterator;
		typedef typename RBTree<K,  K, SetOfKey>::const_iterator const_iterator;

		pair<iterator, bool> insert(const K& key)
		{
			return _t.Insert(key);
		}


		const_iterator begin() const
		{
			return _t.begin();
		}

		const_iterator end() const
		{
			return _t.end();
		}

	private:
		RBTree<K,  K, SetOfKey> _t;
	};
}